package com.resumes.resumesdataservice.service.Impl;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.resumes.resumesdataservice.domain.ListStudent;
import com.resumes.resumesdataservice.domain.TextInfo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.resumes.resumesdataservice.mapper.StudentMapper;
import com.resumes.resumesdataservice.domain.Student;
import com.resumes.resumesdataservice.service.StudentService;
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService{

    @Resource
    private StudentMapper studentMapper;


    public List<ListStudent> new_list() {
        return studentMapper.newList();
    }

    @Override
    public TextInfo getInfo(String id) {
        return studentMapper.getInfo(id);
    }



    @Override
    public List<ListStudent> searchByArgs(String args) {

        if(args==null||args.length()==0){
            return null;
        } else {
            args = "%" + args + "%"; // 模糊查询
            List<ListStudent> searchList = studentMapper.searchByArgs(args);
            return searchList;
        }
    }

    @Override
    public Student login(String id, String pwd) {
        return studentMapper.login(id,pwd);
    }
}
